<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="cache-control" content="no-cache">
<title>Genivia - XML Data Binding</title>
<link href="genivia_tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="genivia_content.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="top">
 <div id="titlearea">
  <table height="72px" width="100%" cellspacing="0" cellpadding="0">
   <tbody>
    <tr>
     <td width="10%">&nbsp;</td>
     <td width="175px"><a href="https://www.genivia.com"><img alt="Genivia" src="GeniviaLogo2_trans_noslogan.png"/></a></td>
     <td class="tab_home"><a href="https://www.genivia.com">Home</a></td>
     <td class="tab_home"><a href="https://www.genivia.com/docs.html">Documentation</a></td>
     <td>
      <div style="float: right; font-size: 18px; font-weight: bold;">XML Data Binding</div>
      <br>
      <div style="float: right; font-size: 10px;">updated Wed Jan 9 2019 by Robert van Engelen</div>
     </td>
     <td width="10%">&nbsp;</td>
    </tr>
   </tbody>
  </table>
 </div>
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('page_XMLDataBinding.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">XML Data Binding </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>SOAP/XML services use data bindings contractually bound by WSDL and auto- generated by wsdl2h and soapcpp2 (see Service Bindings). Plain data bindings are adopted from XML schemas as part of the WSDL types section or when running wsdl2h on a set of schemas to produce non-SOAP-based XML data bindings.</p>
<p>The following readers and writers are C/C++ data type (de)serializers auto- generated by wsdl2h and soapcpp2. Run soapcpp2 on this file to generate the (de)serialization code, which is stored in soapC.c[pp]. Include "soapH.h" in your code to import these data type and function declarations. Only use the soapcpp2-generated files in your project build. Do not include the wsdl2h- generated .h file in your code.</p>
<p>Data can be read and deserialized from:</p><ul>
<li>an int file descriptor, using soap-&gt;recvfd = fd</li>
<li>a socket, using soap-&gt;socket = (int)...</li>
<li>a C++ stream (istream, stringstream), using soap-&gt;is = (istream*)...</li>
<li>a C string, using soap-&gt;is = (const char*)...</li>
<li>any input, using the soap-&gt;frecv() callback</li>
</ul>
<p>Data can be serialized and written to:</p><ul>
<li>an int file descriptor, using soap-&gt;sendfd = (int)...</li>
<li>a socket, using soap-&gt;socket = (int)...</li>
<li>a C++ stream (ostream, stringstream), using soap-&gt;os = (ostream*)...</li>
<li>a C string, using soap-&gt;os = (const char**)...</li>
<li>any output, using the soap-&gt;fsend() callback</li>
</ul>
<p>The following options are available for (de)serialization control:</p><ul>
<li>soap-&gt;encodingStyle = NULL; to remove SOAP 1.1/1.2 encodingStyle</li>
<li>soap_mode(soap, SOAP_XML_TREE); XML without id-ref (no cycles!)</li>
<li>soap_mode(soap, SOAP_XML_GRAPH); XML with id-ref (including cycles)</li>
<li>soap_set_namespaces(soap, struct Namespace *nsmap); to set xmlns bindings</li>
</ul>
<h1><a class="anchor" id="a"></a>
Top-level root elements of schema "urn:address-book-example"</h1>
<ul>
<li>&lt;a:address-book&gt; <a class="el" href="class__a____address__book.html">_a__address_book</a> <div class="fragment"><div class="line"><span class="comment">// Reader (returns SOAP_OK on success):</span></div><div class="line">soap_read__a__address_book(<span class="keyword">struct</span> soap*, <a class="code" href="class__a____address__book.html">_a__address_book</a>*);</div><div class="line"><span class="comment">// Writer (returns SOAP_OK on success):</span></div><div class="line">soap_write__a__address_book(<span class="keyword">struct</span> soap*, <a class="code" href="class__a____address__book.html">_a__address_book</a>*);</div><div class="line"><span class="comment">// REST GET (returns SOAP_OK on success):</span></div><div class="line">soap_GET__a__address_book(<span class="keyword">struct</span> soap*, <span class="keyword">const</span> <span class="keywordtype">char</span> *URL, <a class="code" href="class__a____address__book.html">_a__address_book</a>*);</div><div class="line"><span class="comment">// REST PUT (returns SOAP_OK on success):</span></div><div class="line">soap_PUT__a__address_book(<span class="keyword">struct</span> soap*, <span class="keyword">const</span> <span class="keywordtype">char</span> *URL, <a class="code" href="class__a____address__book.html">_a__address_book</a>*);</div><div class="line"><span class="comment">// REST POST (returns SOAP_OK on success):</span></div><div class="line">soap_POST_send__a__address_book(<span class="keyword">struct</span> soap*, <span class="keyword">const</span> <span class="keywordtype">char</span> *URL, <a class="code" href="class__a____address__book.html">_a__address_book</a>*);</div><div class="line">soap_POST_recv__a__address_book(<span class="keyword">struct</span> soap*, <a class="code" href="class__a____address__book.html">_a__address_book</a>*);</div></div><!-- fragment --> </li>
</ul>
</div></div><!-- contents -->
</div><!-- doc-content -->
<hr class="footer">
<address class="footer">
Copyright (C) 2019, Robert van Engelen, Genivia Inc., All Rights Reserved.
</address>
<address class="footer"><small>
Converted on Wed Jan 9 2019 10:40:52 by <a target="_blank" href="http://www.doxygen.org/index.html">Doxygen</a> 1.8.11</small></address>
<br>
<div style="height: 246px; background: #DBDBDB;">
</body>
</html>
